package com.letoken.platform.repo.admin.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * Le账户-用户闪兑订单表
 * </p>
 *
 * @author 作者
 * @since 2022-12-12
 */
@Getter
@Setter
@TableName("app_user_swap_record")
@ApiModel(value = "AppUserSwapRecord对象", description = "Le账户-用户闪兑订单表")
public class AppUserSwapRecord extends Model<AppUserSwapRecord> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键id")
      @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField("user_id")
    private Integer userId;

    @ApiModelProperty("订单编号")
    @TableField("order_id")
    private String orderId;

    @ApiModelProperty("支付币种Id（1-USDT  2-LET）")
    @TableField("from_type")
    private Integer fromType;

    @ApiModelProperty("支付币种名称")
    @TableField("from_type_name")
    private String fromTypeName;

    @ApiModelProperty("支付数量")
    @TableField("from_amount")
    private BigDecimal fromAmount;

    @ApiModelProperty("接受币种Id（1-USDT  2-LET）")
    @TableField("to_type")
    private Integer toType;

    @ApiModelProperty("接受币种名称")
    @TableField("to_type_name")
    private String toTypeName;

    @ApiModelProperty("接受数量")
    @TableField("to_amount")
    private BigDecimal toAmount;

    @ApiModelProperty("订单状态（0失败1成功）")
    @TableField("status")
    private Integer status;

    @ApiModelProperty("订单创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;


    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
